<?php
/**
 * +----------------------------------------------------------------------
 * | summer framework
 * +----------------------------------------------------------------------
 * | Copyright (c) 2020 https://github.com/suframe/think-admin All rights reserved.
 * +----------------------------------------------------------------------
 * | Author: summer <806115620@qq.com>  2020/4/30 14:26
 * +----------------------------------------------------------------------
 */

namespace app\mall\validate;


use think\Validate;

class User extends Validate
{
    protected $rule = [
        'nickname'  =>  'require|max:128',
        'phone' =>  'require|mobile|unique:mall_user',
        'email' =>  'email|unique:mall_user',
        'avatar' =>  'url',
        'money' =>  'number',
        'point' =>  'number',
    ];

    protected $message  =   [
        'nickname.require' => '昵称必须填写',
        'phone.require'     => '手机号必填',
        'email'        => '邮箱格式错误',
        'money.number'        => '金额必须是数字',
        'point.number'        => '积分必须是数字',
    ];
}